import 'package:flutter/cupertino.dart';
import 'package:pull_to_refresh/pull_to_refresh.dart';
import 'base_state.dart';

class BaseViewModel<S extends BaseState> extends ChangeNotifier {
  /// 列表控制器
  final ScrollController scrollController = ScrollController();

  /// 刷新组建控制器
  final RefreshController refreshController = RefreshController(initialRefresh: false);

  /// 状态
  final S state;

  /// 释放资源
  @override
  void dispose() {
    /// 释放资源（如取消订阅 Stream、关闭控制器等）
    super.dispose();
  }

  BaseViewModel(this.state);
}
